<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.boo</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Boo) - Theme (Breeze Light)"/>
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
<span style="color:#898887;">&quot;&quot;&quot;module docstring&quot;&quot;&quot;</span>

<span style="color:#924c9d;">namespace</span> My.NameSpace <span style="color:#898887;">#optional namespace declaration</span>

<span style="color:#924c9d;">import</span> Assembly.Reference <span style="color:#898887;">#import statements</span>

<span style="color:#898887;">#followed by the Members of this module (classes, methods, etc.)</span>
<span style="font-weight:bold;">class</span> MyClass:
    <span style="font-weight:bold;">pass</span>

<span style="font-weight:bold;">def</span> domyfunction(it):
    <span style="color:#0057ae;">print</span>(it)

<span style="color:#898887;">#start &quot;main&quot; section that is executed when script is run</span>
x <span style="color:#924c9d;">as</span> <span style="color:#0057ae;">int</span>
x = <span style="color:#b08000;">3</span>
domyfunction(x)

<span style="color:#898887;">#optional assembly attribute declarations used when compiling</span>
[assembly: AssemblyTitle(<span style="color:#bf0303;">'foo'</span>)]
[assembly: AssemblyDescription(<span style="color:#bf0303;">'bar'</span>)]

<span style="color:#924c9d;">import</span> MyLibrary
<span style="color:#0057ae;">print</span> (Version)
doit()

[Module]
<span style="font-weight:bold;">class</span> MainClass:
    <span style="font-weight:bold;">public</span> <span style="font-weight:bold;">static</span> Version <span style="color:#924c9d;">as</span> <span style="color:#0057ae;">string</span>

    <span style="font-weight:bold;">static</span> <span style="font-weight:bold;">def</span> <span style="font-weight:bold;">constructor</span>():
        Version = <span style="color:#bf0303;">&quot;0.1&quot;</span>

<span style="font-weight:bold;">def</span> doit():
    <span style="color:#898887;">#you can refer to &quot;globals&quot; from within your library, too:</span>
    <span style="color:#0057ae;">print</span>(<span style="color:#bf0303;">&quot;This library's version is: &quot;</span>+MainClass.Version)

</pre></body></html>
